{include file="public/header"}
<title>详情</title>
</head>
<style>
    .formControls {
        padding-top: 3px;
    }
</style>
<body>
<article class="page-container">
    <form action="" method="post" class="form form-horizontal" id="form-member-add">
        <div class="ch-row ch-info-form">
            <p class="flex1">店长列表：</p>
            <div class="flex2">
                <select name="user_id" class="form-control">
                    <option selected="selected" value=" ">请选择</option>
                    {volist name='data' id='v'}
                    <option value="{$v.user_id}">{$v.username}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="ch-row ch-info-form">
            <p class="flex1">业绩：</p>
            <div class="flex2">
                <input type="number" class="form-control fid" value="" name="content" placeholder="请输入该月业绩">
            </div>
        </div>
        <br>
        <div class="ch-row">
            <div class="flex1">
                <button class="btn btn-primary radius" style="width: 100%" type="button"><i class="Hui-iconfont">&#xe632;</i> 提交</button>
            </div>
        </div>

    </form>
</article>

{include file="public/footer"}
</body>
<script>
    $('.radius').click(function () {
        var src="{:Url('index/achievement/add')}";
        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
        $.ajax({
            type: 'POST',
            url: src,
            dataType: 'json',
            data:$('form').serializeArray(),
            success: function (data) {
                var res=JSON.parse(data);
                if(res.code==200){
                    layer.closeAll();
                    layer.msg(res.msg, {icon: 1, time: 2000}, function () {
                        setTimeout("window.parent.location.reload()", 1);
                    });

                }else{
                    layer.msg(res.msg,{icon: 5,time:1000});
                }

            },
            error: function (data) {
                console.log(data.msg);
            },
        })
    });
</script>


</html>